<template>
  <el-rate v-model="modelinput" />
</template>

<script setup>
  import { ref, computed } from 'vue'

  const props = defineProps({
    modelValue: 0,
  })

  const emits = defineEmits(['update:modelValue'])

  // 默认值
  const modelinput = computed({
    get: () => props.modelValue,
    set: (val) => {
      emits('update:modelValue', val)
    },
  })
</script>
